﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.ContextMenuItemAttribute
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Use this attribute to add a context menu to a field that calls a  named method.</para>
  /// </summary>
  [AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = true)]
  public class ContextMenuItemAttribute : PropertyAttribute
  {
    /// <summary>
    ///   <para>The name of the context menu item.</para>
    /// </summary>
    public readonly string name;
    /// <summary>
    ///   <para>The name of the function that should be called.</para>
    /// </summary>
    public readonly string function;

    /// <summary>
    ///   <para>Use this attribute to add a context menu to a field that calls a  named method.</para>
    /// </summary>
    /// <param name="name">The name of the context menu item.</param>
    /// <param name="function">The name of the function that should be called.</param>
    public ContextMenuItemAttribute(string name, string function)
    {
      this.name = name;
      this.function = function;
    }
  }
}
